<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/2/26
 * Time: 1:06
 */

namespace app\common\model;


use think\Model;

class UserRole extends Model
{
    /**
     * 主键
     * @var string
     */
    protected $pk = 'id';

    /**
     * 表
     * @var string
     */
    protected $table = 'user_role';

    /**
     * 关联模型 1 对 多
     * @return \think\model\relation\HasMany
     */
    public function role()
    {
        return $this->hasMany('role', 'id');
    }
}